package cn.lili.controller.feign;

import cn.lili.modules.im.client.IMClient;
import cn.lili.modules.im.entity.dos.ImTalk;
import cn.lili.modules.im.entity.dto.IMTalkQueryParams;
import cn.lili.modules.im.service.ImTalkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author paulG
 * @since 2023/2/6
 **/
@RestController
public class IMClientController implements IMClient {

    @Autowired
    private ImTalkService imTalkService;

    @Override
    public List<ImTalk> getImTalkList(IMTalkQueryParams imTalkQueryParams) {
        return imTalkService.list(imTalkQueryParams.queryWrapper());
    }

    @Override
    public void updateImTalkBatch(List<ImTalk> imTalks) {
        imTalkService.updateBatchById(imTalks);
    }
}
